<script type="text/javascript" src="${base}/scripts/xsgl/xsdpkdetail.js"></script>
<div id="xsd_tabs" class="easyui-tabs" detail="true" data-options="fit:true,border:false">
<input type="hidden" id="xsd_id" value="${(xsd.id)!}"/>
<input type="hidden" id="xsd_xsdh" value="${(xsd.xsdh)!}"/>
<input type="hidden" id="xsd_ewmtime" value="${(ewmtime)!}"/>
<#--<input type="hidden" id="xsd_detail_xslx" name="xsd.xslx" value="<#if xsd??>${(xsd.xslx)!}<#else>${xslx}</#if>"/>-->
<input type="hidden" id="xsd_detail_xslx" value="${(xsd.xslx)!}"/>
<input type="hidden" id="xsd_detail_sl" value="${(xsd.sl)!}"/>

<div title="销售信息">
    <table style="width: 100%" class="tb tab-t t-bor">
        <col width="70px"/>
        <col width=""/>
        <col width="70px"/>
        <col width=""/>
        <col width="70px"/>
        <col width=""/>
        <tr>
            <th style="color:#f45212;">
                销售单号：
            </th>
            <td>
            ${(xsd.xsdh)!}
            </td>
            <th>路&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;径：</th>
            <td colspan="3">
            <#if xsd?? && xsd.lj??>
                <span class="ljtip">  ${(xsd.lj.mc)!}</span>
            </#if>
            </td>
            <input id="xsd_detail_ljtip" value="${(xsd.lj.id)!}" type="hidden"/>
        </tr>
        <tr>
            <th>销售合同：</th>
            <td>
                <a href="javascript:void(0)" onclick="viewXsdglXshtDetail('${(xsd.xsht.id)!}')">
                ${(xsd.xsht.htbm)!}
                </a>
            </td>
            <th>销售类型：</th>
            <td>
            <#if xsd.xslx?? && xsd.xslx=="htxs" >合同销售<#else>
                <#if xsd.xslx?? && xsd.xslx=="kcls" >库存零售<#elseif xsd.xslx?? && xsd.xslx=="zddh" >直达到货<#else>保供销售
                </#if>
            </#if>
            </td>

            <th>客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户：</th>
            <td>
            ${(xsd.kh.qc)!}
            </td>
        </tr>
        <tr>
            <th>工&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;程：</th>
            <td>
            ${(xsd.gc.mc)!}
            </td>
            <th>提货仓库：</th>
            <td>
            ${(xsd.thck.mc)!}
            </td>
            <th>开单日期：</th>
            <td>
            ${(xsd.sxsj?datetime)!}
            </td>
        </tr>
        <tr>
            <th>计划发货：</th>
            <td>
            ${(xsd.fhsj?date)!}
            </td>
            <th>税&nbsp;率(%)：</th>
            <td>
            ${(xsd.sl?string("0.0000"))!}
            </td>
            <th>状态：</th>
            <input id="xsdzt" type="hidden" value="${(xsd.zt)!}"/>
            <td>
            <#if xsd??&&xsd.zt??&&xsd.zt == 'ybc'>已保存<#else><#if xsd??&&xsd.zt??&&xsd.zt == 'ytj'>已提交<#else>
                已审批</#if></#if>
            </td>
        </tr>
        <tr>
            <th>发运责任：</th>
            <td>
            ${(xsd.fyzr.z)!}
            </td>
            <th>代收费用：</th>
            <td>
            ${(xsd.dsyfje?string(",##0.0000"))!}
            </td>
            <th>提&nbsp;货&nbsp;&nbsp;人：</th>
            <td>
            ${(xsd.thr)!}
            </td>
        </tr>
        <tr>
            <th>交货时间：</th>
            <td>
            ${(xsd.jhsj?datetime)!}
            </td>
            <th>送货地址：</th>
            <td>
            ${(xsd.jhdz)!}
            </td>
            <th>放货方式：</th>
            <td>
            <#if xsd??&&xsd.fhfs??&&xsd.fhfs == 'self'>自提<#else><#if xsd??&&xsd.fhfs??&&xsd.fhfs == 'transfer'>过户<#else>
                未知</#if></#if>
            </td>
            </td>
        </tr>
        <tr>
            <th>收&nbsp;货&nbsp;&nbsp;人：</th>
            <td>
            ${(xsd.shry)!}
            </td>
            <th>联系电话：</th>
            <td>
            ${(xsd.shrdh)!}
            </td>
            <th>交货要求：</th>
            <td>
            ${(xsd.jhyq)!}
            </td>
        </tr>
    <#if xsd?? && xsd.xslx?? && xsd.xslx=="kcls" >
        <tr>
            <th>已&nbsp;审&nbsp;核：</th>
            <td>
                <#if xsd.cwsh??&&xsd.cwsh>是<#else>否</#if>
            </td>
            <th>审核时间：</th>
            <td>
            ${(xsd.shsj?datetime)!}
            </td>
            <th>审&nbsp;核&nbsp;&nbsp;人：</th>
            <td>
            ${(xsd.shr.xm)!}
            </td>
        </tr>
    </#if>
    <#if xsd?? && xsd.xslx?? && xsd.xslx!="zddh" >
        <tr>
            <th>已&nbsp;出&nbsp;库：</th>
            <td>
                <#if xsd.yck??&&xsd.yck>是<#else>否</#if>
            </td>
            <th>出库时间：</th>
            <td>
            ${(xsd.cksj?datetime)!}
            </td>
            <th>出&nbsp;库&nbsp;&nbsp;人：</th>
            <td>
            ${(xsd.ckr.xm)!}
            </td>
        </tr>
    </#if>
    <#if  xsd?? && xsd.xslx?? && xsd.xslx="zddh">
        <th>采购单号:</th>
        <td>${(cgd.cgdh)!}</td>
        <th>采购合同：</th>
        <td>
        ${(cgd.cght.htbm)!}
        </td>
        <th>供&nbsp;&nbsp;应&nbsp;&nbsp;商：</th>
        <td>
        ${(cgd.gys.jc)!}
        </td>
    </#if>
        <tr>
            <th>申报公司：</th>
            <td>
            ${(xsd.sbgs.jc)!}
            </td>
            <th>申&nbsp;报&nbsp;&nbsp;人：</th>
            <td>
            ${(xsd.sbr.xm)!}
            </td>
            <th>销售公司：</th>
            <td>
            ${(xsd.xsgs.jc)!}
            </td>
        </tr>

        <tr>
            <th>结算状态：</th>
            <td>
            ${(jszt)!''}
            </td>
            <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
            <td colspan="3">
            ${(xsd.bz)!}
            </td>
        </tr>
        <tr>
            <th>制&nbsp;单&nbsp;&nbsp;人：</th>
            <td>${(xsd.createUser.xm)!}</td>
            <th>制单时间：</th>
            <td>${(xsd.dateCreated?datetime)!}</td>
        </tr>
    </table>
</div>
<div title="销售明细">
    <table id="xsd_xsdmx_table">
    </table>
</div>

<div title="计费明细">
    <table id="xsd_jfmx_table" class="easyui-datagrid" url="${base}/xsgl/xsdgl/xsdgl_jfmx?xsdId=${(xsd.id)!}"
           rownumbers="true" fit="true" fitColumns="false" showFooter="true">
        <thead>
        <tr>
            <th data-options="field:'XSXT_XSDH',width:80,align: 'center'">合同子项号</th>
            <th data-options="field:'NAME',width:80,align: 'center'">物资名称</th>
            <th data-options="field:'CZ',width:80,align: 'center'">材质</th>
            <th data-options="field:'GGXH',width:80,align: 'center'">规格型号</th>
            <th data-options="field:'CARNO',width:80,align: 'center'">车皮号</th>
            <th data-options="field:'BINDNO',width:80,align: 'center'">捆包号</th>
            <th data-options="field:'ZL',width:100,formatter:formatSlForHtml,align: 'right'">赎货数量</th>
            <th data-options="field:'HSJ',width:80,formatter:formatJeForHtml,align: 'right'">合同单价(元)</th>
            <th data-options="field:'SJDJ',width:80,formatter:formatJeForHtml2,align: 'right'">结算单价(元)</th>
            <th data-options="field:'KHFKSJ',width:80,align: 'center'">赎货时间</th>
            <th data-options="field:'TZFKSJ',width:80,align: 'center'">投资付款时间</th>
            <th data-options="field:'SJZYTS',width:80,align: 'center'">实际占用天数</th>
            <th data-options="field:'JSZYTS',width:80,align: 'center'">计算占用天数</th>
            <th data-options="field:'DLFJE',width:80,formatter:formatJeForHtml2,align: 'right'">代理费(元)</th>
            <th data-options="field:'YHJE',width:80,formatter:formatJeForHtml2,align: 'right'">优惠金额(元)</th>
            <th data-options="field:'TXTS',width:80,formatter:formatJeForHtml2,align: 'right'">贴息天数</th>
            <th data-options="field:'TXJE',width:80,formatter:formatJeForHtml2,align: 'right'">贴息(元)</th>
            <th data-options="field:'GHJE',width:80,formatter:formatJeForHtml2,align: 'right'">赎货金额(元)</th>
            <th data-options="field:'GHZJE',width:80,formatter:formatJeForHtml2,align: 'right'">购货金额(元)</th>
            <th data-options="field:'SFJE',width:80,formatter:formatJeForHtml2,align: 'right'">付款情况(元)</th>
            <th data-options="field:'BZ',width:80,formatter:formatJeForHtml2,align: 'right'">备注</th>

        </tr>
        </thead>
    </table>
</div>
<#--<div title="费用明细">
    <table id="xsd_xsdfy_table" class="easyui-datagrid" url="${base}/xsgl/xsdgl/xsdgl_xsfy?xsdId=${(xsd.id)!}"
           rownumbers="true" fit="true" fitColumns="true" showFooter="true">
        <thead>
        <tr>
            <th data-options="field:'sydw.qc',width:50,align: 'center'">收益单位</th>
            <th data-options="field:'fylb.fykmjc',width:50,align: 'center'">费用类别</th>
            <th data-options="field:'jfsl',width:30,formatter:formatSlForHtml,align: 'right'">计费重量</th>
            <th data-options="field:'dj',width:30,formatter:formatJeForHtml,align: 'right'">单价(元)</th>
            <th data-options="field:'je',width:30,formatter:formatJeForHtml2,align: 'right'">金额(元)</th>
            <th data-options="field:'jsdh',width:50,align: 'center'">结算单号</th>
            <th data-options="field:'bz',width:50,align: 'center'">备注</th>
        </tr>
        </thead>
    </table>
</div>-->
<div title="销售单打印">
<div id="xsdy-toolbar">
<div class="PTools">
    <ul class="niu">
        <li><span class="xuan">选择打印机：</span>
            <select class="ze" name="" style="">
                <option>——默认——</option>
            </select>
        </li>
        <li><a class="she" href="javascript:void(0);" onclick="checkIsInstall('XSD')">检查插件</a></li>
        <li><a class="watch" href="javascript:void(0);" onclick="xsdyPrintPreview()">打印</a></li>
        <li><a class="baocun" href="javascript:void(0);" onclick="savePrintElement()">保存修改</a></li>
        <li><a class="reload" href="javascript:void(0);" onclick="exportWord()">导出word</a></li>
    <#--  <li><a class="pen" href="javascript:void(0);" onclick="CreatePrintPage1();">套打</a></li>-->
    </ul>
    <ul class="niu">
    <#--<li><a href="javascript:void(0);" class="rep" plain="true" id="xsd_csl"-->
    <#--&lt;#&ndash;onclick="cslClick1('cksl_name');"&ndash;&gt;>出售联</a></li>-->
    <#--   <li><a href="javascript:void(0);" class="rep" plain="true"
    onclick="jzlClick('cksl_name');">记账联</a></li>-->
        <li><a href="javascript:void(0);" class="start" plain="true" id="xsd_thd"
        <#--onclick="thdClick1('cksl_name');"-->>放货通知单</a></li>
        <li><a href="javascript:void(0);" class="start" plain="true" id="xsd_shd"
        <#-- onclick="shdClick1('cksl_name');"-->>提货通知单</a>
    </ul>

</div>
<table>

    <input type="hidden" id="xsmx_hsj_1" value="on"/>     <#--含税单价-->
    <input type="hidden" id="xsmx_hse_1" value="on"/>    <#--含税额-->

<#-- <tr>
     <th>选择打印:</th>
     <td>
         &nbsp;&nbsp;&nbsp; 含税单价：<input type="checkbox" id="xsmx_hsj" checked="true"/>&nbsp;&nbsp;&nbsp;
         含税额：<input type="checkbox" id="xsmx_hse" checked="true"/>
     </td>
 </tr>-->
</table>
<div id="xsdy_id">
    <object id="XSD_LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
        <embed id="XSD_LODOP_EM" type="application/x-print-lodop" width=0 height=0
               pluginspage="install_lodop32.exe"></embed>
    </object>
    <div id="xsdy_print_id" class="textcon">
        <table id="xsdy_print_table" class="tb" style="width: 100%;font-size:13px;">
            <input id="xsd_thck_detail" type="hidden" value="${(xsd.thck.mc)!}">
            <input id="xsd_thzckdz_detail" type="hidden" value="${(xsd.thck.dz)!}">
            <input id="xsd_bz" type="hidden" value="${(xsd.bz)!}">
            <input id="ysgjList" type="hidden" value="${(xsd.psd.shch)!}"/>
            <tbody>
            <colgroup>
                <col width="10%;"/>
                <col width="27%"/>
                <col width="15%;"/>
                <col width="20%"/>
                <col width="12%;"/>
                <col width="23%"/>
            </colgroup>
            <tbody>
            <#--colspan 列合并  rowspan 行合并-->
            <tr>
                <td colspan="6" style="text-align: center;">
                    <span style="font-size: 20px;font-weight:600;">提货通知书</span>
                </td>
            </tr>
            <tr style="height: 40px;">
                <td colspan="6" style="text-align: right;font-size: 19px;">
                    <span>编号：
                        <span style="text-decoration:underline">CDTZ-THTZS-${(currentTime?string('yyyy'))!}
                            -${(xsd.kh.zjm)!'请维护此出库单客户的助记码'}
                            <span id="xsd_lsh_htm"><input id="xsd_lsh" class="input-tian4" value="${(xsd.lsh)!'0000'}"/></span>
                        </span>
                    </span>
                </td>
            </tr>
            <tr style="height: 40px;">
                <td colspan="6" style="text-align: left;font-size: 16px;">
                    <span>致：</span><span
                        style="text-decoration: underline">成都达海金属加工配送有限公司</span><span>(监管人)</span>
                </td>
            </tr>
            <tr style="height: 40px;">
                <td colspan="6" style="text-align: left;font-size: 16px;">
                            <span>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;根据
                                PGTZSFHZ-
                                 <span>
                                      <input id="xsd_zh" class="input-tian2" style="width: 80px;"
                                             value="${(xsd.zh)!''}"/>
                                  </span>
                                号 《三方合作协议》的约定，经审核，本公司同意<span
                                    style="text-decoration: underline"><span id="xsd_thrs_htm"><input id="xsd_thrs"
                                                                                                      class="input-tian2"
                                                                                                      value="${(xsd.thrs)!''}"/></span></span>
                                   前往贵公司办理下列监管物的提货手续，经办人
                                 <span style="text-decoration: underline">
                                     <span id="xsd_jbr_htm">
                                         <input id="xsd_jbr" class="input-tian2" value="${(xsd.jbr)!''}"/></span>
                                 </span>，身份证号码为
                                 <span style="text-decoration: underline"><span id="xsd_sfzhm_htm"><input id="xsd_sfzhm"
                                                                                                          class="input-tian3"
                                                                                                          value="${(xsd.sfzhm)!''}"/></span></span> &nbsp; &nbsp;车号：
                                 <span style="text-decoration: underline"><span id="xsd_cars_htm"><input id="xsd_cars"
                                                                                                         class="input-tian3"
                                                                                                         value="${(xsd.cars)!''}"/></span></span>。
                            </span>
                    <span style="font-weight: bold;font-size: 16;">以下货权请转<span
                            style="text-decoration: underline">${(xsd.kh.qc)!''}。</span></span>
                </td>
            </tr>
            <tr style="height: 40px;">
                <td colspan="6" style="text-align: left;font-size: 16px;">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请贵公司予以审核并办理以下监管物资的提货手续为盼! 按照
                    《三方合作协议》的约定，有关代收、代储、中转费用由<span
                        style="text-decoration: underline">${(xsd.kh.qc)!''}</span>支付。
                </td>
            </tr>
            <#--<tr>-->
            <#--<th>购料单位:</th>-->
            <#--<td><input id="xsddetail_kh" class="input-tian" readonly="readonly" value="${(xsd.kh.qc)!}"/>-->
            <#--</td>-->
            <#--<th>制单日期:</th>-->
            <#--<td><input id="xsddetail_sxsj" class="input-tian" readonly="readonly"-->
            <#--value="<#if xsd??>${(xsd.dateCreated?datetime)!}</#if>"/></td>-->
            <#--</tr>-->
            <#--<tr>-->
            <#--<th>提货仓库:</th>-->
            <#--<td><input id="xsddetail_thck" class="input-tian" readonly="readonly"-->
            <#--value="${(xsd.thck.mc)!}"/></td>-->
            <#--<th>发货日期:</th>-->
            <#--<td><input id="xsddetail_jhrq" class="input-tian" readonly="readonly"-->
            <#--value="<#if xsd??>${(xsd.fhsj?datetime)!}</#if>"/></td>-->
            <#--</tr>-->
            <#-- <tr><th>出库状态:</th>
                 <td>
                 <#if xsd.yck><input class="input-tian" readonly="readonly"
                                     value="已出库"/><#else>
                     <input class="input-tian" readonly="readonly" value="未出库"/></#if>
                 </td></tr>-->
            </tbody>
        </table>
    </div>

    <div id="xsdy_xsd_id" class="textcon"></div>


    <div id="xsdy_detail_id" class="textcon">
        <table class="tb" style="width: 100%;font-size:13px;">
            <colgroup>
                <col width="10%;"/>
                <col width="15%"/>
                <col width="10%;"/>
                <col width="15%"/>
                <col width="10%;"/>
                <col width="15%"/>
            </colgroup>
            <tbody>

            <tr style="height: 40px;">
                <th style="text-align: center;font-size: 16px;">经办：</th>
                <td colspan="2" style="text-align: left;font-size: 16px;">
                ${(xsd.createUser.xm)!''}
                </td>
                <th style="text-align: center;font-size: 16px;">复核：</th>
                <td colspan="2" style="text-align: left;font-size: 16px;">
                ${(xsd.shr.xm)!''}
                </td>
            </tr>
            <tr>
                <th style="text-align: center;font-size: 16px;">委托人：</th>
                <td colspan="2" style="text-align: left;font-size: 16px;">
                    <span style="text-decoration: underline">攀钢集团成都投资管理有限公司(预留印鉴)</span>
                </td>
                <td colspan="3" style="text-align: left;font-size: 16px;">
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <span>
                           <input id="xsd_year" class="input-tian2"
                                  value="<#if xsd.year??>${(xsd.year)!''}<#else>${(currentTime?string('yyyy'))!}</#if>"/>
                    </span>
                    年
                    <span>
                           <input id="xsd_month" class="input-tian2"
                                  value="<#if xsd.month??>${(xsd.month)!''}<#else>${(currentTime?string('MM'))!}</#if>"/>
                    </span>
                    月
                    <span>
                          <input id="xsd_day" class="input-tian2"
                                 value="<#if xsd.day??>${(xsd.day)!''}<#else>${(currentTime?string('dd'))!}</#if>"/>
                    </span>
                    日
                </td>
            </tr>
            <#--<tr>-->
            <#--<th style="font-size: 12px;">备注:</th>-->
            <#--<td>-->
            <#--<input id="xsddy_bz" class="input-tian" readonly="readonly"-->
            <#--value="${(xsd.bz)!} ${(xsd.gc.mc)!}"/>-->
            <#--</td>-->
            <#--<th>出库状态:</th>-->
            <#--<td>-->
            <#--<#if xsd.yck><input class="input-tian" readonly="readonly"-->
            <#--value="已出库"/><#else>-->
            <#--<input class="input-tian" readonly="readonly" value="未出库"/></#if>-->
            <#--</td>-->
            <#--<th>代垫运费:</th>-->
            <#--<td>-->
            <#--<input class="input-tian" readonly="readonly"-->
            <#--value="${(xsd.dsyfje)!}"/>-->
            <#--</td>-->
            <#--</tr>-->
            <#--<tr>-->
            <#--<th style="font-size: 12px;">提货人:</th>-->
            <#--<td>-->
            <#--<input id="xsddy_thr" class="input-tian" readonly="readonly" value="${(xsd.thr)!}"/>-->
            <#--</td>-->
            <#--<th style="font-size: 12px;">发料员:</th>-->
            <#--<td>-->
            <#--<input id="xsddy_fly" class="input-tian" readonly="readonly" value="${(xsd.ckr.xm)!}"/>-->
            <#--</td>-->
            <#--<th style="font-size: 12px;">制单人:</th>-->
            <#--<td>-->
            <#--<input id="xsddy_zdr" class="input-tian" readonly="readonly"-->
            <#--value="${(xsd.createUser.xm)!}"/>-->
            <#--</td>-->
            <#--</tr>-->
            <#--<tr>-->
            <#--<th></th>-->
            <#--<td colspan="1"></td>-->
            <#--<th></th>-->
            <#--<td>${(currentTime?string('yyyy-MM-dd HH:mm:ss'))!}</td>-->
            <#--</tr>-->
            </tbody>
        </table>
    </div>
</div>
</div>
</div>
</div>

